package Class.Constructor.This;

/**
 * Enjoy programming!!!
 * Time: 2021/11/8 -  10:47
 */
public class This00 {
    public static void main(String[] args) {
        Dog dog1 = new Dog("大壮", 4);
        dog1.info();
    }
}

class Dog {
    String name;
    int age;

    public Dog(String dname, int dage) {
        name = dname;
        age = dage;
    }

    public void info() {
        System.out.println("name= " + name + '\n' + "age= " + age);
    }
}